<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>
		<script type="text/javascript">
			var nian = 2015;
			switch(nian % 4 == 0 && nian % 100 != 0 || nian % 400 == 0) {
				case true:
					document.write(nian + "年是闰年");
					break;
				case false:
					document.write(nian + "年是平年");
					break;

			}

			var yue = 2;
			switch(yue) {
				case 1:
				case 3:
				case 5:
				case 7:
				case 8:
				case 10:
				case 12:

					document.write(yue + "月是31天");
					break;
				case 6:

				case 9:
				case 11:
					document.write(yue + "月是30天");
					break;
				default:
					switch(nian % 4 == 0 && nian % 100 != 0 || nian % 400 == 0) {
						case true:
							document.write(yue + "月有29天");
							break;
						case false:
							document.write(yue + "月有28天");
							break;
					}
			}
			//				case 2:
			//				switch(nian % 4 == 0 && nian % 100 != 0 || nian % 400 == 0) {
			//				case true:
			//					document.write(yue + "月是29天");
			//					break;
			//				case false:
			//					document.write(yue + "月是28天");
			//					break;
		</script>
	</body>

</html>